<form id="frmAddSubCatCategory" name="frmAddSubCatCategory" class="add-category round_border">
    <div class="chosen_category">
        Chọn danh mục sản phẩm
    </div>
    <div class="list-item-category">
        <div id="cat_1">
            <select class="w170p" size="15" id="selectcat1" onclick="AdminController.checkExistProductSubCategory('product_maker',this.value, 1);">
                <option value="0">Danh mục gốc</option>
                <?php foreach ($aryCategory as $key => $value) {
 ?>
                    <option value="<?php echo $value['category_id']; ?>">&nbsp;<?php echo $value['category_name']; ?><?php echo ($value['category_total_child'] > 0 ) ? ' >' : ''; ?></option>
<?php } ?>
            </select>
        </div>
        <div id="cat_2" class="hide">
            <select class="w160p" id="selectcat2" size="15" onclick="AdminController.checkExistProductSubCategory('product_maker', this.value, 2);">

            </select>
        </div>
        <div id="cat_3" class="hide">
            <select class="w160p" id="selectcat3" size="15" onclick="AdminController.checkExistProductSubCategory('product_maker', this.value, 3);">

            </select>
        </div>
        <div id="cat_4" class="hide">
            <select class="w160p" id="selectcat4" size="15" onclick="AdminController.checkExistProductSubCategory('product_maker', this.value, 4);">

            </select>
        </div>
        <div id="cat_5" class="hide">
            <select class="w160p" id="selectcat5" size="15" onclick="AdminController.checkExistProductSubCategory('product_maker', this.value, 5);">

            </select>
        </div>
    </div>
    <div id="sub-input-item">
        <div id="item-0">
            <span>Tên danh mục con</span>
            <span><input type="text" name="sub_category_name[]" class="w150p"></span>
            <span>Ảnh</span>
            <span><input type="file" name="image_category[]" size="20"></span>
            <span>Hiển thị</span>
            <span>
                <select name="category_is_show[]" style="width: 80px;">
                    <option value="1">Có</option>
                    <option value="0">Không</option>
                </select>
            </span>
            <span><a class="cpointer" onclick="AdminController.addRowItemCategory('sub-input-item', 'sub-input-item-hidden');"><img src="/public/images/form/add-icon.png"></a></span>
            <span style="padding-left: 20px;"><a class="cpointer" onclick="AdminController.removeRowItemCategory(this, 'sub-input-item');"><img src="/public/images/form/delete.png"></a></span>
        </div>
    </div>
    <div>
        <input type="button" class="cpointer submit" onclick="AdminController.saveSubCategory();" value="Thêm">
    </div>
    <input type="hidden" name="category_id_hidden" id="category_id_hidden">
</form>
<div id="sub-input-item-hidden" style="display: none;">
    <span>Tên danh mục con</span>
    <span><input type="text" name="sub_category_name[]" class="w150p"></span>
    <span>Ảnh</span>
    <span><input type="file" name="image_category[]" size="20"></span>
    <span>Hiển thị</span>
    <span>
        <select name="category_is_show[]" style="width: 80px;">
            <option value="1">Có</option>
            <option value="0">Không</option>
        </select>
    </span>
    <span><a class="cpointer" onclick="AdminController.addRowItemCategory('sub-input-item', 'sub-input-item-hidden');"><img src="/public/images/form/add-icon.png"></a></span>
    <span style="padding-left: 20px;"><a class="cpointer" onclick="AdminController.removeRowItemCategory(this, 'sub-input-item');"><img src="/public/images/form/delete.png"></a></span>
</div>
